import React from 'react';

class LikesButton extends React.Component {
  constructor(props) {
    super(props);
    this.state={
      likes: 0
    };
  }
  increaseLikes() {
    this.setState({
      likes: this.state.likes+1
    });
  }
  render() {
    return (
      <div>
        <button
          type="button"
          className="btn btn-outline-primary btn-lg"
          onClick={() => {this.increaseLikes();}}
        >
          👍 {this.state.likes}
        </button>
      </div>

    );
  }
}

export default LikesButton;
